<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
<title>DynamoRIO API: drwrap.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">DynamoRIO API
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('drwrap_8h.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">drwrap.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Header for DynamoRIO Function Wrapping and Replacing Extension.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga925e96b9b70bcf935279bfd79dbe6c7f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga925e96b9b70bcf935279bfd79dbe6c7f">DRMGR_PRIORITY_NAME_DRWRAP</a>&#160;&#160;&#160;&quot;drwrap&quot;</td></tr>
<tr class="memitem:ga0f9e93e3ba51cc96470fd261eaa55273"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga0f9e93e3ba51cc96470fd261eaa55273">DRWRAP_REPLACE_NATIVE_DATA_SLOT</a>&#160;&#160;&#160;<a class="el" href="dr__ir__utils_8h.html#a89a6b714ff24d91d78589877047a29b9ae4cd78beccb2525acc61f2536ba1ea71">SPILL_SLOT_2</a></td></tr>
<tr class="memitem:gad88566adce8386b5d2e6c6de83e21e8b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#gad88566adce8386b5d2e6c6de83e21e8b">DRWRAP_REPLACE_NATIVE_SP_SLOT</a>&#160;&#160;&#160;<a class="el" href="dr__ir__utils_8h.html#a89a6b714ff24d91d78589877047a29b9a446ae7a7df24d2c3abae567a17289566">SPILL_SLOT_3</a></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gab48899087cc647f0f791ed0c459adc53"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
&#160;&#160;<a class="el" href="group__drwrap.html#ggab48899087cc647f0f791ed0c459adc53a556c6bce97b9c415e089261848536c14">DRMGR_PRIORITY_APP2APP_DRWRAP</a> =  -500, 
<br/>
&#160;&#160;<a class="el" href="group__drwrap.html#ggab48899087cc647f0f791ed0c459adc53ada17e11e67b93129fede7890e032bbbd">DRMGR_PRIORITY_INSERT_DRWRAP</a> =  500, 
<br/>
&#160;&#160;<a class="el" href="group__drwrap.html#ggab48899087cc647f0f791ed0c459adc53af45be46f89c86ce07739c8243fde7f5d">DRMGR_PRIORITY_FAULT_DRWRAP</a> =  500
<br/>
 }</td></tr>
<tr class="memitem:ga16cc419209fcb0024d010599bb82aa76"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga16cc419209fcb0024d010599bb82aa76">drwrap_wrap_flags_t</a> { <a class="el" href="group__drwrap.html#gga16cc419209fcb0024d010599bb82aa76aaee35c5aabcb42793293b905c448e1c6">DRWRAP_UNWIND_ON_EXCEPTION</a> =  0x01
 }</td></tr>
<tr class="memitem:gab82c71baab4fe0c5f9962383818b9c92"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#gab82c71baab4fe0c5f9962383818b9c92">drwrap_global_flags_t</a> { <br/>
&#160;&#160;<a class="el" href="group__drwrap.html#ggab82c71baab4fe0c5f9962383818b9c92af1b2f3860316577a15e3430942febc8a">DRWRAP_SAFE_READ_RETADDR</a> =  0x01, 
<br/>
&#160;&#160;<a class="el" href="group__drwrap.html#ggab82c71baab4fe0c5f9962383818b9c92ab7a628a50b1344c943a703a72e5cfce9">DRWRAP_SAFE_READ_ARGS</a> =  0x02, 
<br/>
&#160;&#160;<a class="el" href="group__drwrap.html#ggab82c71baab4fe0c5f9962383818b9c92aeb299993e17993cb86912f93391f6b86">DRWRAP_NO_FRILLS</a> =  0x04, 
<br/>
&#160;&#160;<a class="el" href="group__drwrap.html#ggab82c71baab4fe0c5f9962383818b9c92add150e3e7ba4ee203a045b936f872b4b">DRWRAP_FAST_CLEANCALLS</a> =  0x08
<br/>
 }</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga23837833101ebc340ac7de6e8340bb4a"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga23837833101ebc340ac7de6e8340bb4a">drwrap_init</a> (void)</td></tr>
<tr class="memitem:ga0e58babc53301c4ade4027dc1e09a088"><td class="memItemLeft" align="right" valign="top">DR_EXPORT void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga0e58babc53301c4ade4027dc1e09a088">drwrap_exit</a> (void)</td></tr>
<tr class="memitem:ga488a6566cd760a3919bdd2f49a6d672f"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga488a6566cd760a3919bdd2f49a6d672f">drwrap_replace</a> (app_pc original, app_pc replacement, bool override)</td></tr>
<tr class="memitem:ga0ae2e383b0005a46848c7d0497be563a"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga0ae2e383b0005a46848c7d0497be563a">drwrap_replace_native</a> (app_pc original, app_pc replacement, bool at_entry, uint stack_adjust, void *user_data, bool override)</td></tr>
<tr class="memitem:ga3f23eb9d8bd537881dcea9ecb19b5a4f"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga3f23eb9d8bd537881dcea9ecb19b5a4f">drwrap_is_replaced</a> (app_pc func)</td></tr>
<tr class="memitem:ga87ab96ab2d3c5cc33480693266b33249"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga87ab96ab2d3c5cc33480693266b33249">drwrap_is_replaced_native</a> (app_pc func)</td></tr>
<tr class="memitem:gadadab62f67c3e8198762776012a66fce"><td class="memItemLeft" align="right" valign="top">DR_EXPORT void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#gadadab62f67c3e8198762776012a66fce">drwrap_replace_native_fini</a> (void *drcontext)</td></tr>
<tr class="memitem:ga4c004987daae07af15f2146c2d7d4b09"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga4c004987daae07af15f2146c2d7d4b09">drwrap_wrap</a> (app_pc func, void(*pre_func_cb)(void *wrapcxt, OUT void **user_data), void(*post_func_cb)(void *wrapcxt, void *user_data))</td></tr>
<tr class="memitem:gaff6f66f7ec021cea150eb753f5db2b75"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#gaff6f66f7ec021cea150eb753f5db2b75">drwrap_wrap_ex</a> (app_pc func, void(*pre_func_cb)(void *wrapcxt, INOUT void **user_data), void(*post_func_cb)(void *wrapcxt, void *user_data), void *user_data, <a class="el" href="group__drwrap.html#ga16cc419209fcb0024d010599bb82aa76">drwrap_wrap_flags_t</a> flags)</td></tr>
<tr class="memitem:ga27894370f3da794ff3f31cb8d7ec079b"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga27894370f3da794ff3f31cb8d7ec079b">drwrap_unwrap</a> (app_pc func, void(*pre_func_cb)(void *wrapcxt, OUT void **user_data), void(*post_func_cb)(void *wrapcxt, void *user_data))</td></tr>
<tr class="memitem:ga92584c3e1980ac0c467de7d14d2bc2a2"><td class="memItemLeft" align="right" valign="top">DR_EXPORT app_pc&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga92584c3e1980ac0c467de7d14d2bc2a2">drwrap_get_drcontext</a> (void *wrapcxt)</td></tr>
<tr class="memitem:ga106eb283e97c560a0118b8da211b7f1a"><td class="memItemLeft" align="right" valign="top">DR_EXPORT app_pc&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga106eb283e97c560a0118b8da211b7f1a">drwrap_get_func</a> (void *wrapcxt)</td></tr>
<tr class="memitem:ga9a33b1049986dd8975e94827f5c0e759"><td class="memItemLeft" align="right" valign="top">DR_EXPORT <a class="el" href="dr__defines_8h.html#a5d50a4225e834d67f66438669608e435">dr_mcontext_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga9a33b1049986dd8975e94827f5c0e759">drwrap_get_mcontext</a> (void *wrapcxt)</td></tr>
<tr class="memitem:gac3a79cf043d8c21dc190721d9fb105de"><td class="memItemLeft" align="right" valign="top">DR_EXPORT <a class="el" href="dr__defines_8h.html#a5d50a4225e834d67f66438669608e435">dr_mcontext_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#gac3a79cf043d8c21dc190721d9fb105de">drwrap_get_mcontext_ex</a> (void *wrapcxt, <a class="el" href="dr__defines_8h.html#af0434595b47158e7512c2bf5f0e43ae4">dr_mcontext_flags_t</a> flags)</td></tr>
<tr class="memitem:gae4a50709cf98fca89860c09543176fa6"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#gae4a50709cf98fca89860c09543176fa6">drwrap_set_mcontext</a> (void *wrapcxt)</td></tr>
<tr class="memitem:ga2da9c1f9ef091b6856a98c6ce5e2a3f5"><td class="memItemLeft" align="right" valign="top">DR_EXPORT app_pc&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga2da9c1f9ef091b6856a98c6ce5e2a3f5">drwrap_get_retaddr</a> (void *wrapcxt)</td></tr>
<tr class="memitem:ga3d0864daf1ec37a91640a739f8928b83"><td class="memItemLeft" align="right" valign="top">DR_EXPORT void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga3d0864daf1ec37a91640a739f8928b83">drwrap_get_arg</a> (void *wrapcxt, int arg)</td></tr>
<tr class="memitem:ga17937b1d8ff7e391814e4e6e6df5c807"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga17937b1d8ff7e391814e4e6e6df5c807">drwrap_set_arg</a> (void *wrapcxt, int arg, void *val)</td></tr>
<tr class="memitem:gae993f55e025cf80ae67ed398b35a1b61"><td class="memItemLeft" align="right" valign="top">DR_EXPORT void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#gae993f55e025cf80ae67ed398b35a1b61">drwrap_get_retval</a> (void *wrapcxt)</td></tr>
<tr class="memitem:gafd31e6725143df904e766dbfa508db05"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#gafd31e6725143df904e766dbfa508db05">drwrap_set_retval</a> (void *wrapcxt, void *val)</td></tr>
<tr class="memitem:gae539b1092ba0c1a3e86172964a671805"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#gae539b1092ba0c1a3e86172964a671805">drwrap_skip_call</a> (void *wrapcxt, void *retval, size_t stdcall_args_size)</td></tr>
<tr class="memitem:ga0f84bd239ed2f9f3550d66b75fb9b392"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga0f84bd239ed2f9f3550d66b75fb9b392">drwrap_register_post_call_notify</a> (void(*cb)(app_pc pc))</td></tr>
<tr class="memitem:ga1b4b6da75fceb5977ff1f82bf3ffd8c9"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga1b4b6da75fceb5977ff1f82bf3ffd8c9">drwrap_unregister_post_call_notify</a> (void(*cb)(app_pc pc))</td></tr>
<tr class="memitem:ga61b97c33203c704dd8ff1b9d31b3d2a9"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga61b97c33203c704dd8ff1b9d31b3d2a9">drwrap_mark_as_post_call</a> (app_pc pc)</td></tr>
<tr class="memitem:gae2cc2affaf879182ba4d92299704c65f"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#gae2cc2affaf879182ba4d92299704c65f">drwrap_set_global_flags</a> (<a class="el" href="group__drwrap.html#gab82c71baab4fe0c5f9962383818b9c92">drwrap_global_flags_t</a> flags)</td></tr>
<tr class="memitem:ga01e56e9bac8f584fe25e806a24769d50"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga01e56e9bac8f584fe25e806a24769d50">drwrap_is_wrapped</a> (app_pc func, void(*pre_func_cb)(void *wrapcxt, OUT void **user_data), void(*post_func_cb)(void *wrapcxt, void *user_data))</td></tr>
<tr class="memitem:ga16fc2d260f5ebead724d5eb98bf13ac2"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drwrap.html#ga16fc2d260f5ebead724d5eb98bf13ac2">drwrap_is_post_wrap</a> (app_pc pc)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Header for DynamoRIO Function Wrapping and Replacing Extension. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_1c2293a07c09a9e2b32ca067d36e7658.html">dynamorio_package</a></li><li class="navelem"><a class="el" href="dir_908861fef8f908da2485ad4f190715de.html">ext</a></li><li class="navelem"><a class="el" href="dir_3fe1ade1fbd941d4287f2bfba5f009d1.html">drwrap</a></li><li class="navelem"><a class="el" href="drwrap_8h.html">drwrap.h</a></li>
    <li class="footer" style="float:none;text-align:center"><img border=0 src="favicon.png"> &nbsp;  DynamoRIO API version 5.0.0 --- Wed Sep 10 2014 21:36:44 &nbsp; <img border=0 src="favicon.png">
</small></address>
<!--END !GENERATE_TREEVIEW-->
</body>
</html>
